package cn.ersan.boot.sms.controller;

import cn.ersan.boot.sms.service.SMSService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 86189
 */
@RestController
@RequestMapping("/sms")
public class SMSController {
    @Resource
    private  SMSService smsService;

    @PostMapping("/send")
    public String sendVerificationCode(@RequestParam String phoneNumber, @RequestParam String message) {
        return smsService.sendSMS(phoneNumber, message);
    }
}
